package com.amigo.online.message.entity;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 单聊消息
 */
@Data
public class ChatMessage implements Serializable {
    /**
     * /服务器为消息分配的递增ID，可用于去重/排序
     */
    private long sequence;

    private String msgType;

    private String fromAppId;

    /**
     * 发送者ID
     */
    private String fromAccount;

    private String fromResource;

    private String toAppId;

    private String toAccount;

    /**
     * 发送者ID
     */
    private String toResource;

    /**
     * 消息体Base64编码后数据
     */
    private String payload;

    private Date timestamp;

    /**
     * 客户端生成的消息ID
     */
    private String packetId;

    /**
     * 可用于表示消息类型扩展字段
     */
    private String bizType;
    /**
     * 群聊中所有用户/未收到消息的用户
     */
    private Long[] toAccounts;

    private static final long serialVersionUID = 1L;
}